package info.techgeek.labs.camparator;

import java.io.Serializable;

public class EmployeeView implements Serializable, Comparable {

	private String name;
	private String age;

	public String getName() {
//		float f=1.3; 
//		char c="a"; 
//		byte b=257; 
//		boolean b=null; 
		int i=10; 
		 
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	@Override
	public int compareTo(Object o) {
		System.out.println("inside compareTo(Object o) ");
		
		if ( o instanceof EmployeeView ){
			System.out.println("(EmployeeView)o).getName()) "+(String)((EmployeeView)o).getName());
			System.out.println("this.getName() "+this.getName());
			
//			if ( this.getName().compareToIgnoreCase((String)((EmployeeView)o).getName())==0);
				return this.getName().compareToIgnoreCase((String)((EmployeeView)o).getName());
			
		}
		return 0;
	}
}
